<template>
	<view class="tabbar-box flex flex-between">
		<view class="tabbar" v-if="priv.includes('1')" @click="goto('index/supplier')">供应链</view>
		<view class="tabbar" v-if="priv.includes('2')" @click="goto('index/direct')">直营</view>
		<view class="tabbar" v-if="priv.includes('3')" @click="goto('index/open')">开单</view>
	</view>
	<view class="tabbar-blank"></view>
</template>

<script lang="ts" setup>
	import { onMounted,ref } from 'vue'
	import {goto} from "@/utils/utils"
	const priv = ref<string[]>([])
	onMounted(()=>{
		let upriv = uni.getStorageSync('priv')
		priv.value = upriv.split(',')
		console.log(priv.value)
	})
</script>

<style lang="scss">
$bar-height:100rpx;
.tabbar-box{
	position:fixed;
	bottom:0;
	left:0;
	width:750rpx;
	height:$bar-height;
	background-color: #fff;
	border-top: 1px solid #f1f1f1;
}
.tabbar-blank{
	height:$bar-height;
}
</style>